import Vue from "vue";
import Vuex from "vuex"

Vue.use(Vuex)

//创建VueX对象
const store = new Vuex.Store({
    state: {
        //存放的键值对就是所要管理的状态
        adminId: null,
        token: null
    },
    mutations: {
        changeadminId(state, ID) {
            state.adminId = ID
        },
        changetoken(state, token) {
            state.token = token
        }
    }
})

export default store